package pattern5.leifeng;

/**
 * 工厂方法实现
 * @author wdl
 */
public class Factory {
}

/**
 * 学雷锋学生工厂类
 */
class UndergraduateFactory implements IFactory{

    @Override
    public LeiFeng createLeifeng() {
        return new Undegraduate();
    }
}

/**
 * 学雷锋志愿者工厂类
 */
class VolunteerFactory implements IFactory{

    @Override
    public LeiFeng createLeifeng() {
        return new Volunteer();
    }
}